namespace MvcEnrollment.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class stuAndDirToTran : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Transaction",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        trxnError = c.String(),
                        trxnStatus = c.String(),
                        trxnNumber = c.String(),
                        trxnAmount = c.String(),
                        authCode = c.String(),
                        trxnReference = c.String(),
                        trxnDate = c.String(),
                        trxnType = c.String(),
                        trxnDetail = c.String(),
                        createBy = c.String(),
                        createDate = c.DateTime(nullable: false),
                        modifiedBy = c.String(),
                        modifiedDate = c.DateTime(nullable: false),
                    })
                .PrimaryKey(t => t.ID);
            
            AddColumn("dbo.Student", "createBy", c => c.String());
            AddColumn("dbo.Student", "createDate", c => c.DateTime(nullable: false));
            AddColumn("dbo.Student", "modifiedBy", c => c.String());
            AddColumn("dbo.Student", "modifiedDate", c => c.DateTime(nullable: false));
            DropTable("dbo.Direct");
        }
        
        public override void Down()
        {
            CreateTable(
                "dbo.Direct",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        trxnError = c.String(),
                        trxnStatus = c.String(),
                        trxnNumber = c.String(),
                        returnAmount = c.String(),
                        authCode = c.String(),
                        trxnReference = c.String(),
                    })
                .PrimaryKey(t => t.ID);
            
            DropColumn("dbo.Student", "modifiedDate");
            DropColumn("dbo.Student", "modifiedBy");
            DropColumn("dbo.Student", "createDate");
            DropColumn("dbo.Student", "createBy");
            DropTable("dbo.Transaction");
        }
    }
}
